<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<%@ page import="java.sql.*;"%>

<%
 Connection con = null;
 try{
  Class.forName("com.mysql.jdbc.Driver");
  String jdbcUrl="jdbc:mysql://147.47.228.6:3306/jsptest"; // my ip : 147.47.228.6
  String id="user1";
  String pass="1234";
  
  con=DriverManager.getConnection(jdbcUrl,id,pass);
  out.println("Connection Success");
  
  
  Statement stmt = con.createStatement();
	String sql = "insert into done2(name, age) values(\"test\", 18);"; 
	
	stmt.executeUpdate(sql);
  
 }catch(Exception e){
  e.printStackTrace();
 }
%>
</body>
</html>